package cn.happy.day04;

public class 报数 {
    public static void main(String[] args) {
        int cnt,ming,hong,sum;
        cnt=ming=hong=1;
        sum=0;
        do {
            if (ming == hong){
                sum+=1;
            }
            if (ming<20){
                ming+=1;
            }
            else ming=1;

            if (hong<30) hong+=1;
            else hong=1;

            cnt+=1;
        }
        while (cnt<1000);
        System.out.println(sum);
    }
}
